package com.example.demo.controller;

import com.example.demo.domian.UserVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Name TestController
 * @Description
 * @Author wen
 * @Date 2020-03-28
 */
@Slf4j
@RestController
@RequestMapping("test")
public class TestController {

    @PostMapping("index")
    public UserVo testUser(UserVo userVo, @RequestBody String body) {
        log.info("接收到的body信息={}", body);
        log.info("获取到的userVo信息={}", userVo);
        return userVo;
    }
}
